import { axios } from '@/utils/request'

// 分组列表-素材库
export function getWarehouseGroup(type) {
  return axios({
    url: `/admin/material-center-group/getList?type=${type}`,
    method: 'get'
  })
}

// 新增分组-素材库
export function addWarehouseGroup(data) {
  return axios({
    url: `/admin/material-center-group/add`,
    method: 'post',
    data
  })
}

// 编辑分组-素材库
export function editWarehouseGroup(data) {
  return axios({
    url: `/admin/material-center-group/edit`,
    method: 'post',
    data
  })
}

// 删除分组-素材库
export function deleteWarehouseGroup(id) {
  return axios({
    url: `/admin/material-center-group/del/${id}`,
    method: 'post'
  })
}

// 查询素材列表-根据分组ID-素材库
export function getWarehouseList(params) {
  return axios({
    url: `/admin/material-center/pageList`,
    method: 'get',
    params
  })
}

// 新增素材-素材库
export function addWarehouse(data) {
  return axios({
    url: `/admin/material-center/add`,
    method: 'post',
    data
  })
}

// 编辑素材-素材库
export function editWarehouse(data) {
  return axios({
    url: `/admin/material-center/edit`,
    method: 'post',
    data
  })
}

// 移动素材-素材库
export function moveWarehouse(data) {
  return axios({
    url: `/admin/material-center/move`,
    method: 'post',
    data
  })
}

// 删除素材-素材库
export function deleteWarehouse(data) {
  return axios({
    url: `/admin/material-center/del`,
    method: 'post',
    data
  })
}

// 全选分组下素材-素材库
export function checkedAllWarehouse(params) {
  return axios({
    url: `/admin/material-center/allIds`,
    method: 'get',
    params
  })
}


